<?php
namespace Home\Controller;
use Think\Controller;
class FrontController extends Controller {
    public function index(){
    	$catalog = M('product_catalog')->where('parent_id = 0')->select();
    	$products = M('product')->where('hot = 1')->limit(4)->select();
    	$notice = M('article')->where('type = 0')->limit(5)->select();
    	$new = M('article')->where('type = 1')->limit(5)->select();
    	$this->assign('catalog',$catalog);
    	$this->assign('products',$products);
    	$this->assign('notice',$notice);
    	$this->assign('new',$new);
    	$this->display();
    }
}